import useAxios from "@/hooks/useAxios"

function add(data){
  return useAxios('/shop-api/address/add',{
    method:"POST",
    data,
    loading:true,
    reqAuth:true
  })
}
function list(data){
  return useAxios('/shop-api/address/list',{
    method:"POST",
    data,
    reqAuth:true
  })
}
function getByID(id){
  return useAxios('/shop-api/address/getOne',{
    method:"POST",
    data:{
      id
    },
    reqAuth:true
  })
}
function edit(data){
  return useAxios('/shop-api/address/edit',{
    method:"POST",
    data,
    reqAuth:true
  })
}

export {add,list,getByID,edit}